from pathlib import Path
from PyQt5.QtCore import QObject, pyqtSlot
from PyQt5.QtGui import QGuiApplication
from PyQt5.QtQml import QQmlApplicationEngine
# from PyQt5.QtQuickControls2 import QQuickStyle

import sys
import test_pyside6.style_rc


if __name__ == "__main__":
    app = QGuiApplication(sys.argv)
    engine = QQmlApplicationEngine()
    # qml_file = Path(__file__).resolve().parent / "main.qml"
    engine.load("main.qml")
    # engine.rootContext().setContextProperty('pymyClass', x) # pymyClass 为在qml中调用时使用的名字，可以随便起
    if not engine.rootObjects():
        sys.exit(-1)
    sys.exit(app.exec())


